package com.iwomy.secureplat.platform.controller;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iwomy.secureplat.common.core.util.R;
import com.iwomy.secureplat.common.excel.annotation.ResponseExcel;
import com.iwomy.secureplat.common.log.annotation.SysLog;
import com.iwomy.secureplat.common.security.annotation.Inner;
import com.iwomy.secureplat.platform.entity.AlarmTypeEntity;
import com.iwomy.secureplat.platform.service.AlarmTypeService;
import com.iwomy.secureplat.platform.service.QuartzService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.http.HttpHeaders;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 报警类型
 *
 * @author pig
 * @date 2023-12-22 19:11:50
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/quartz")
@Tag(description = "quartz", name = "定时任务")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class QuartzController {

	final QuartzService quartzService;

	/**
	 * 统计每天的设备状态
	 *
	 * @return
	 */
	@Operation(summary = "统计每天的设备状态", description = "统计每天的设备状态")
	@GetMapping("/deviceEventReport")
	@Inner(value = false)
	public R deviceEventReport() {
		quartzService.deviceEventReport();
		return R.ok();

	}

}